# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Geoffroy Carrier <geoffroy.carrier@aur.archlinux.org>
# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=dot2tex
pkgver=2.11.3
pkgrel=6
pkgdesc="Graphviz to LaTeX converter"
arch=('any')
url="https://dot2tex.readthedocs.io/en/latest/"
license=('MIT')
depends=('python-pyparsing' 'graphviz')
makedepends=('python-setuptools')
source=($pkgname-$pkgver.tar.gz::https://github.com/kjellmf/dot2tex/archive/$pkgver.tar.gz)
sha512sums=('1595299811461b18cff490a8a56c0215f46989dd4a46fa087b455c717ed5d5f7a5782d04acaa3e4567b4e348bca866d5f24d21663012c4cd813445804ef6f714')

build() {
	cd ${pkgname}-${pkgver}
	python setup.py build
}

package() {
	cd ${pkgname}-${pkgver}

	python setup.py install --root="${pkgdir}" --skip-build

	# Install custom license file
	install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
